
<!--  -->
<template>
  <div class="app-container">
    <el-form
      :inline="false"
      label-width="200px"
      size="normal"
      label-position="right"
    >
      <el-form-item label="门店名称：">
        <el-input
          v-model="form.shopName"
          size="normal"
          style="width: 200px"
          clearable
          @change=""
        ></el-input>
      </el-form-item>
      <el-form-item label="支付方式：">
        <el-radio-group v-model="form.paymode" @change>
          <el-radio label="线上支付"></el-radio>
          <el-radio label="线下支付"></el-radio>
        </el-radio-group>
      </el-form-item>
      <template v-for="(i, index) in modes">
        <el-form-item label="可预约时间段：">
          <el-time-picker
            v-model="i.startTime"
            size="normal"
            value-format="HH:mm"
            format="HH:mm"
            is-range
            style="width: 150px"
          />
        </el-form-item>
        <el-form-item label="同一时间可预约单数：">
          <div style="marginbottom: 15px">
            <el-input
              v-model="i.value"
              size="small"
              style="width: 200px"
              clearable
            ></el-input>
            <el-button
              type="danger"
              size="small"
              style="margin-left: 35px"
              v-if="index != 0"
              @click="$emit('delMode', index)"
              >删除</el-button
            >
            <el-button
              v-if="index == modes.length - 1"
              type="primary"
              size="small"
              style="margin-left: 35px"
              @click="$emit('addMode')"
              >新增</el-button
            >
          </div>
        </el-form-item>
      </template>
      <el-form-item>
        <el-button type="primary" @click>保存设置</el-button>
        <el-button>重置设置</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  props: ["form", "sOpt", "modes", "addMode"],
  data() {
    return {};
  },
};
</script>
<style>
</style>